using SharpGraphT.Graph.Builder;
using SharpGraphT.Util;

namespace SharpGraphT.Graph;

public class WeightedMultigraph<TV, TE> : Multigraph<TV, TE>
    where TE : class, new() {
    private static readonly long serialVersionUID = -6009321659287373874L;

    public WeightedMultigraph() :
        this(null, SupplierUtil.CreateSupplier<TE>()) { }

    public WeightedMultigraph(Func<TV> vertexSupplier, Func<TE> edgeSupplier) :
        base(vertexSupplier, edgeSupplier, true) { }

    public new static GraphBuilder<TV, TE, WeightedMultigraph<TV, TE>>
        CreateBuilder() =>
        new(new WeightedMultigraph<TV, TE>());

    public new static GraphBuilder<TV, TE, WeightedMultigraph<TV, TE>>
        CreateBuilder(Func<TE> edgeSupplier) =>
        new(new WeightedMultigraph<TV, TE>(null, edgeSupplier));
}